#!/bin/bash

#
# Does a full build of the complete stack on local VMs
#

set -eux

(
  cd ../lobby-db
  ./build_docker
  ./run_docker
)

(
  cd ..
  ./gradlew copyShadow
)

(
  echo "Sleeping to give time for postgres DB to initialize"
  sleep 5
  cd ../lobby-db
  ./run_flyway
)

vagrant up

./run_ansible
